.sub-dialog {
  width: max-content !important;
  max-width: min(90vw, 1200px) !important;
}

.sub-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sub-row {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1rem;
  margin-bottom: 8px;
  align-items: center;
  width: 100%;

  .sub-column {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 4px;
    width: 100%;

    svg {
      flex-shrink: 0;
      transform: translateY(1px);
    }

    .sub-value {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 2px;

      p {
        font-weight: bolder;
      }
    }

    &:first-child {
      margin-bottom: 8px;
    }

    &:last-child {
      margin-bottom: 0;
    }
  }
}

.plan-wrapper {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  justify-content: center;
  width: 100%;

  @media (max-width: 870px) {
    grid-template-columns: 1fr;
  }

  &.disable {
    grid-template-columns: 1fr;
  }
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 1rem;
  color: hsl(var(--text));
  width: 100%;

  &.standard {
    border-color: hsl(var(--text-secondary));
  }

  .title {
    text-align: center;
    font-size: 16px;
    margin: 4px;
  }

  .award {
    display: flex;
    flex-direction: column;
    color: hsl(var(--gold));
    justify-content: center;
    align-items: center;
    user-select: none;
    font-size: 0.75rem;
    line-height: 0.8rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--gold));

    svg {
      flex-shrink: 0;
      transform: translateY(1px);
    }

    div {
      word-break: break-word;
      white-space: break-spaces;
      text-align: center;
    }
  }

  .price-wrapper {
    position: relative;
    width: max-content;
    margin: 0 auto;

    .price {
      font-size: 18px;
      font-weight: bold;
      margin: 2px auto;

      .tax {
        color: hsl(var(--text-secondary));
      }
    }

    .annotate {
      position: absolute;
      font-size: 14px;
      margin-top: 0.25rem;
      font-weight: normal;
      color: hsl(var(--text-secondary));
      right: 0;
      bottom: 0;
      transform: translateX(calc(100% + 0.1rem));
    }
  }

  .desc {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem 0;

    .api-tip {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    div {

      svg {
        flex-shrink: 0;
      }
    }
  }

  .action {
    margin-top: auto !important;
  }
}

.upgrade-wrapper {
  margin: 24px auto 8px;

  .price {
    font-size: 14px;
    margin-top: 12px;
    text-align: center;
    transform: translateY(12px);

    .tax {
      color: hsl(var(--text-secondary));
    }
  }
}

@media (max-width: 460px) {
  .plan {
    min-width: 0 !important;
  }
}
